
if (DEBUG)
    message("Compile debug version")
    ## 添加编译选项
    add_compile_options(-g)

    ## 添加宏定义
    add_definitions(-DDEBUG)
else()
    message("Compile release version")
endif()

## 设置源文件路径
set(SOURCE_FILES exec_main.c)

aux_source_directory (math SOURCE_FILES)
aux_source_directory (utils SOURCE_FILES)

# 设置编译器标志
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra")

## 添加头文件目录
include_directories (../include)

add_executable (exec_demo ${SOURCE_FILES})

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)

## 链接库
target_link_libraries(exec_demo pthread)